Skip to content

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Jan 8, 2026

This PR converts SearchQuotientSpur into an abstract base class with specialized forms for different cases. Three implementations are provided:

  • SearchQuotientRoot - for the root node of the search
  • LegacyQuotientRoot - for modeling existing behavior at the root node of the search ('insert' edits supported within the same "module")
    • Of note: this was made necessary by an error I encountered in development of refactor(web): implement token splitting on SearchQuotientNode types 🚂 #15023.
      • SearchQuotientSpur cannot directly use the constructor of any of its subtypes without a runtime JS error occurring.
      • This thus mandated a separate 'root node' type that does not inherit from (or overload) SearchQuotientSpur... which also does give us clearer typing and behavior for it.
  • LegacyQuotientSpur - for modeling existing behavior before swapping to our target design and model

In the future, the plan is to retire LegacyQuotientSpur in favor of three new variants:

  • InsertionQuotientSpur
  • DeletionQuotientSpur
  • SubstitutionQuotientSpur

The search graph can then be dynamically built and managed in accordance with our target design as documented at #15161.

Build-bot: skip build:web
Test-bot: skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jan 8, 2026

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot changed the title refactor(web): differentiate search-space module types refactor(web): differentiate search-space module types 🚂 Jan 8, 2026
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S20 milestone Jan 8, 2026
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 28ded16 to 3a56e23 Compare January 9, 2026 17:32
This PR converts SearchQuotientSpur into an abstract base class with specialized forms for different cases.  Two implementations are provided:
- SearchQuotientRoot - for the root node of the search
- LegacyQuotientSpur - for modeling existing behavior before swapping to our target design and model

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/differentiate-module-types branch from 8f505b3 to 348e876 Compare January 9, 2026 17:33
@jahorton jahorton marked this pull request as ready for review January 14, 2026 21:31
@keyman-server keyman-server modified the milestones: A19S20, A19S21 Jan 16, 2026
@@ -0,0 +1,61 @@
import { PriorityQueue } from '@keymanapp/web-utils';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing prolog comment

@@ -0,0 +1,92 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing header comment

// Shallow-copies the array to prevent external modification; the Transforms
// are marked Readonly to prevent their modification as well.
return [...this.inputs];
return this.inputs ?? [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer matches the comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants